<template>
  <div>
    <div class="swiper-slide" style="background: #040B1B;">
      <a >
        <p align="center">
          <video preload autoplay  controls="controls"   width="50%" poster="https://zeny-online.oss-cn-beijing.aliyuncs.com/teacher/img/2020/03/11/ce3fadb7-af37-4e39-a3ad-6106fc69c472logo1.png" >
            <source :src="playUrl" >
          </video>
        </p>
      </a>
    </div>
  </div>
</template>

<script>
    import vod from '@/api/vod'

    export default {
        // layout:'video',
        data() {
            return {
                playUrl: ''
            }
        },
        created() {
            this.playUrl = this.$route.params.playUrl
        }
        /*asyncData({params,error}){
            return vod.getPlayUrlByVid(params.vid)
                .then(response => {
                    console.log(response)
                    if (!response.data.data.playUrl) {
                        this.$router.push({path:'/login'})
                    }
                    return {
                        playUrl: response.data.data.playUrl
                    }
                })
        }*/
    }
</script>

<style scoped>

</style>
